<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head>
    <base href="<%=basePath%>" />
    <title>Abnormal Data Deal Result</title>
    <script type="text/javascript">
		var path = "<%=basePath%>";
	</script>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<link rel="stylesheet" type="text/css" href="<%=basePath%>beshs/css/content.css" />
	<link type="text/css" href="<%=basePath%>beshs/css/frame_style.css" rel="stylesheet" />
	<link type="text/css" href="<%=basePath%>beshs/css/element_style.css" rel="stylesheet" />
	<script type="text/javascript" src="<%=basePath%>resources/jquery/jquery-1.7.2.min.js"></script>
	<!-- 页面特效 -->
	<jsp:include page="/beshs/res-refer/page-effect-reference.jsp" />
	<!-- 系统通用资源 -->
	<jsp:include page="/resources/resource-refer/common-resource-reference.jsp" />
	<!-- 用户访问菜单路径 -->
	<jsp:include page="/resources/usertrace/common-uservisit-reference.jsp" />
	<!-- iframe高度自适应 -->
	<script type="text/javascript">
        function getOsName() { 
    		var OsObject = ""; 
		   	if(navigator.userAgent.indexOf("MSIE")>0) { 
		    	return "MSIE"; 
		   	} 
		   	if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
		        return "Firefox"; 
		   	} 
		   	if(isSafari=navigator.userAgent.indexOf("Safari")>0) { 
		        return "Safari"; 
		   	}  
		  	if(isCamino=navigator.userAgent.indexOf("Camino")>0){ 
		        return "Camino"; 
		   	} 
		   	if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){ 
		        return "Gecko"; 
		   	} 
		} 
        /** 根据浏览器类型选择iframe自适应方式 **/
        function setIframeHeightAutosize() {
        	//获取Iframe对象 ie和firefox都可以获得
        	//readNumException    unUpload  tempException
        	var listIframe = document.getElementById("unUpload"); 
        	var rframe = document.getElementById("readNumException"); 
        	var tframe = document.getElementById("tempException"); 
        	var sframe = document.getElementById("selfException"); 
        	try{
                if(getOsName() == 'MSIE'){
                	//列表
                    var lbHeight = listIframe.document.body.scrollHeight; //IE
                    if(lbHeight<=400){
                    	lbHeight=400;
                        }
                    listIframe.style.height =  lbHeight + "px";
                    var rHeight = rframe.document.body.scrollHeight; //IE
                    if(rHeight==0){
                    	rHeight=400;
                        }
                    rframe.style.height =  rHeight + "px";
                    var tHeight = tframe.document.body.scrollHeight; //IE
                    if(tHeight==0){
                    	tHeight=400;
                        }
                    tframe.style.height =  tHeight + "px";
                    var sHeight = sframe.document.body.scrollHeight; //IE
                    if(sHeight==0){
                    	sHeight=400;
                        }
                    sframe.style.height =  sHeight + "px";
                }else if(getOsName() == 'Firefox'){
                	//列表
                    var lfHeight = listIframe.contentDocument.body.scrollHeight; //FireFox 
                    if(lbHeight<=400){
                    	lbHeight=400;
                        }
                    listIframe.height = lfHeight + "px";   
                    var rHeight = rframe.contentDocument.body.scrollHeight; //IE
                    if(rHeight==0){
                    	rHeight=400;
                        }
                    rframe.height =  rHeight + "px";
                    var tHeight = tframe.contentDocument.body.scrollHeight; //IE
                    if(tHeight==0){
                    	tHeight=400;
                        }
                    tframe.height =  tHeight + "px";
                    var sHeight = sframe.contentDocument.body.scrollHeight; //IE
                    if(sHeight==0){
                    	sHeight=400;
                        }
                    sframe.height = sHeight + "px";
                } else {
                    listIframe.style.height = 400 + "px";
                    rframe.style.height =  400 + "px";
                    tframe.style.height =  400 + "px";
                    sframe.style.height =  400 + "px";
                }          
            } catch (ex){}
		}
		$(function() {
			setIframeHeightAutosize();
		})
    </script>
  </head>
  <body>
  	<div class="content_all">
  		<!--导航条-->
  		<div class="insertinfo_table">
		  	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  		<tr>
		  			<th style="text-align: center;" colspan="8" >Abnormal Data of Allocators Query Condition</th>
		  		</tr>
		  		<tr>
		          	<th>Project：</th>
		      		<td><s:property value="infoMap.get(projectID)" /></td>
          			<th>District：</th>
		      		<td><s:property value="infoMap.get(communityID)" /></td>
		        	<th>Building：</th>
		  			<td><s:property value="infoMap.get(buildingID)" /></td>
		  		</tr>
		  		<tr>
		  				<th>Heat Blockage</th>
		  				<td>${heatBlock?"Y":"N"}</td>
						<th>Abnormal Temperature</th>
						<td>${tempException?"Y":"N"}</td>
						<th>Abnormal Communication</th>
						<td>${commException?"Y":"N"}</td>
				</tr>
				<tr>
						<th>Dismounted</th>
						<td>${broken?"Y":"N"}</td>
						<th>Abnormal Battery</th>
						<td>${batteryException?"Y":"N"}</td>
		  		</tr>
		  		<tr>
			  		<th>Front Board Temperature：</th>
			      	<td>${fontTemperatureCom=="b"?">":"<" }${fontTemperature}</td>
	          		<th>Rear Board Temperature：</th>
			      	<td>${backTmperatureCom=="b"?">":"<" }${backTmperature}</td>
			        <th>Temperature Difference：</th>
			      	<td>${temperatureDiffCom=="b"?">":"<"}${temperatureDiff}</td>
		  		</tr>
		  		<tr>
		  			<th>Readings：</th>
		  			<td>${readNumCom=="b"?">":"<"}${readNum}</td>
          			<th>Query Start Date：</th>
          			<td><s:date name='startRecordTime' format='yyyy-MM-dd' nice='false' /></td>
		        	<th>Query End Date：</th>
		      		<td><s:date name='endRecordTime' format='yyyy-MM-dd' nice='false' /></td>
		  		</tr>
		        <tr>
          			<td colspan="2">
		          		<script type="text/javascript">
          					$(function() {
          						$("input[name='goBack']").click(function() {
          							window.history.go(-1);
          						});
          					})
          				</script>
            			<input name="goBack" type="button" value="Return" class="s_btn"/>
            			</td>
		        </tr>
		    </table>
		</div> 
	</div>
	<div class="clear"></div>
	<div class="content_all">
		<!--查询列表-->
  		<ul class="nav_menu"><!--选项卡开始-->
    		<li class="selected"><span>Abnormal Upload Data</span></li>
    		<li><span>Abnormal Reading Data</span></li>
    		<li><span>Abnormal Temperature</span></li>
    		<li><span>Condition Abnormal</span></li>
  		</ul>
  		<div class="nav_content">
   	 		<div class="ct">
   	 			<iframe frameborder="0" name="unUpload" scrolling="auto" id="unUpload" src="" height="90%" width="100%" onload="setIframeHeightAutosize()"></iframe>
   	 		</div>
    		<div class="ct">
    			<iframe frameborder="0" name="readNumException" scrolling="auto" id="readNumException" src="" height="90%" width="100%"></iframe>
    		</div>
    		<div class="ct">
    			<iframe frameborder="0" name="tempException" scrolling="auto" id="tempException" src="" height="90%" width="100%"></iframe>
    		</div>
    		<div class="ct">
    			<iframe frameborder="0" name="selfException" scrolling="auto" id="selfException" src="" height="90%" width="100%"></iframe>
    		</div>
  		</div><!--选项卡结束-->
	</div>
	<script type="text/javascript">
		$(function() {			
 				window.frames["unUpload"].location = path + "dataException/assignMeterDataExceptionResultAction!queryUnUpload.do?queryId="+"${id}"+"&date="+new Date();
 				window.frames["readNumException"].location = path + "dataException/assignMeterDataExceptionResultAction!queryReadNumException.do?queryId="+"${id}"+"&date="+new Date();
 				window.frames["tempException"].location = path + "dataException/assignMeterDataExceptionResultAction!queryTempException.do?queryId="+"${id}"+"&date="+new Date();
 				window.frames["selfException"].location = path + "dataException/assignMeterDataExceptionResultAction!querySelfException.do?queryId="+"${id}"+"&date="+new Date();
  			});
</script>
	
  </body>
</html>
